//
//  FFDynamicFormFactory.h
//  FFSurveillance
//
//  Created by roro_latrobe on 16/11/1.
//  Copyright © 2016年 cn.wanda. All rights reserved.
//

#import "FFDynamicForm.h"
#import "FFSMacro.h"

typedef void (^GetFormDataCompletion)(NSDictionary *dict);

typedef NS_ENUM(NSInteger, FFDynamicFormDataType) {
    FFDynamicFormDataTypeLocal = 0, //! 本地配置文件
    FFDynamicFormDataTypeRemote = 1, //! 请求远程接口
};

@interface FFDynamicFormFactory : NSObject

//FF_AS_SINGLETON1(FFDynamicFormFactory)
+ (FFDynamicFormFactory *)sharedFactory;

//! 获取服务端配置数据
- (FFDynamicForm *)createDynamicForm:(NSString *)type readDataCompleted:(GetFormDataCompletion)completionBlock;

//! 根据配置名字构建表单数据对象
- (FFDynamicForm *)createDynamicForm:(NSString *)configName;

@end
